-- card: 6394 from stack: in.0 -- bmap block id: 0 -- flags: 4000 -- background id: 2612 -- name: DoList ----- HyperTalk script ----- on closecard hide message window end closecard -- part 1 (button) -- low flags: 00 -- high flags: A004 -- rect: left=184 top=33 right=52 bottom=242 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Mode 1 ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put card field list into theList DoList 999,theList,one put the result end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: A004 -- rect: left=262 top=33 right=52 bottom=320 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Mode 2 ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put card field list into theList DoList "Select","Cancel",theList,one put the result end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: A004 -- rect: left=338 top=33 right=52 bottom=396 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Mode 3 ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put card field list into theList DoList "Select","Cancel",theList,DIS,20,156 put the result end mouseUp -- part 4 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=171 top=36 right=133 bottom=340 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: list -- part 5 (button) -- low flags: 00 -- high flags: A003 -- rect: left=82 top=302 right=324 bottom=182 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Install ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put (long name of this stack) into sourceStack delete first word of sourceStack delete first character of sourceStack delete last character of sourceStack put "Select a stack to copy this resource into." put filename("STAK") into fname if fname is empty then hide message window exit mouseup end if if sourcestack=fname then beep Answer "Get real. You can't install it in this stack" hide message window exit mouseup end if -- ModResCopy sourceStack,fname,"XCMD","DoList" -- get the result if first char of it is "E" then put it into the message box beep answer "Attempt to install resource has failed." else beep answer "Resource installation successful" end if hide message window end mouseUp -- part contents for background part 2 ----- text ----- DoList -- part contents for background part 13 ----- text ----- 6 -- part contents for background part 3 ----- text ----- DoList gives you the ability to handle a scrolling list of text strings, allowing a user to select one or more items from a long list. DoList can be used in three different modes: Mode 1: Uses a dialog resource for the list. This requires 2 additional resources in the stack, 1 'DLOG' and its 'DITL' resource. • is the ID of the 'DLOG' resource in the stack. •Item 1 must be a button item, and is used for the Select button. It can have any position and rectangle, and is not reset. •Item 2 must be a button item, and is used for the Cancel button. It can have any position and rectangle, and is not reset. •Item 3 must be a useritem, and is used for the list window. It must have the rectangle and position you wish to use for the list. •Item 4 must be a useritem, and is used for outlining the Select button. It can have any rectangle, since its rect will be set for you. Make sure that the vertical size of useritem 3 (the list window) is a multiple of 15. This insures that it will have the proper appearance. Make sure the visible bit of the dialog resource is false. If the dialog is initially visible, its appearance while it is being drawn to the screen is not as clean and professional-looking. Mode 2: Requires NO additional resources at all. This is the simplest and most common mode. The list box will always appear in the center of the HyperCard window, and will always have the same orientation. Mode 3: Same as mode 2, but the list box position can be anywhere on the HyperCard window. The size and orientation of the box are not changed, only its location on the window. HyperList Copyright ©1987 By James L. Paul Paul Software Engineering RE: HyperList 513 West "A" Street Tehachapi, CA 93561 Compuserve 72767,3436 GEnie J.Paul Release 2.1 November 11,1987 All commercial distribution rights reserved. The XCMD resources and information in this stack may be freely used and distributed for any purpose except direct sale of the DoList XCMD. No guarantees are given as to the performance of this software, and the author is not liable for any losses incured by any user. If you use DoList in one of your stacks for distribution, please include my name in your about box. This type of credit is my only compensation, and is a motivating factor for releasing routines such as these free of charge. -- part contents for card part 4 ----- text ----- Zebra,Elephant,Squirrel,Horse,Fox,Chicken,Cow,Roadrunner,Rabbit,Cobra,Beaver,Frog,Deer,Spider -- part contents for background part 10 ----- text ----- Syntax: Mode 1: DoList , , Mode 2: DoList